package com.slicktechnologies.client.config.configurations;

import com.slicktechnologies.client.utility.Screen;


/**
 * Enum for ConfigTypes.The numeric value of config repersents a specifec type of Config.
 * @author Kamala
 *
 */
public enum ConfigTypes{
	CATEGORY(1), BRAND(2), EXPENSEGROUP(3), CURRENCY(4), PAYMENTTERMS(5), PAYMENTMETHODS(6), EXPENSECATEGORY(7), 
	COMPANYTYPE(8), EMPLOYEEDESIGNATION(9), EMPLOYEEROLE(10),CUSTOMERPARTICULARS(11);
	//Token to add the configTypes with integer value

	

	/**
	 * Constructor of Enum instatniating a new Config Type
	 */
	private final int value;

	private ConfigTypes(final int newValue) {
		value = newValue;
	}

	/**
	 * Returns int value of the configtype 
	 * @return value
	 */
	public int getValue() 
	{ 
		return value; 
	}

	/**
	 *  Returns the integer value corresponding to configType Screen
	 *  There must be one to one relation beetween Config Type and Screen.
	 *   
	 * @return
	 */
	public static int getConfigType(Screen screen) {

		switch(screen)
		{

		
		case COMPANYTYPE:
			return COMPANYTYPE.getValue();
		

		
		
			
		case   EXPENSECATEGORY:
			return   EXPENSECATEGORY.getValue();
		case PAYMENTMETHODS:
			return PAYMENTMETHODS.getValue();
		case PAYMENTTERMS:
			return PAYMENTTERMS.getValue();
		case CURRENCY:
			return CURRENCY.getValue();
		
		

		case EXPENSEGROUP:
			return EXPENSEGROUP.getValue();

		
		case BRAND:
			 return BRAND.getValue();
		case CATEGORY:
			return CATEGORY.getValue();
			
		case CUSTOMERPARTICULARS:
			return CUSTOMERPARTICULARS.getValue();

		default:
			break;


		}

		return -1;
	}

}
